Electronic device and control method thereof

ABSTRACT

An electronic device includes: a first sensor configured to generate a movement signal corresponding to a user movement; a second sensor configured to physically contact the user to generate a user bio-signal; a processor configured to determine a user sleeping state using the generated movement signal and the generated user bio-signal in each of time periods, and determine an operation state of another electronic device based on the determined sleeping state in respective time periods; and a communicator configured to transmit a control command corresponding to the determined operation state to the another electronic device.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from Korean Patent Application No.10-2016-0009382, filed on Jan. 26, 2016 in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein byreference in its entirety.

BACKGROUND

1. Field

Apparatuses and methods consistent with exemplary embodiments relate toan electronic device and a control method thereof, and moreparticularly, to an electronic device and a control method thereof, formeasuring a sleeping state of a user in real time.

2. Description of the Related Art

In general, sleep may be classified into a sleeping stage and anawakening stage from a physiological point of view. The sleeping stagemay be classified into rapid eye movement (REM) sleep and non-REM (NREM)sleep.

Polysomnography is a method for measuring sleep stages and requiresvarious sensors which are attached to a head, a nose, a chest, anabdomen, etc. during sleep. The polysomnography is performed by anexpert in a hospital. Accordingly, recently, devices for easilymeasuring sleep stages at home have been developed.

However, in related art devices, the sensors stay continuously activatedduring sleep, increasing battery consumption and, thus, when a batteryis charged only once, the devices are not capable of being used for along time. In addition, the device is driven using a post-processingmethod and, thus, a user is capable of checking a sleep result after asleep stage detection algorithm is completely terminated. For example,the user needs to wait for about 30 minutes after user sleep isterminated in order to check the result.

SUMMARY

Exemplary embodiments may address at least the above problems and/ordisadvantages and other disadvantages not described above. Also, theexemplary embodiments are not required to overcome the disadvantagesdescribed above, and an exemplary embodiment may not overcome any of theproblems described above.

One or more exemplary embodiments provide an electronic device and acontrol method thereof, for measuring a sleeping state in real time.

According to an aspect of an exemplary embodiment, an electronic deviceincludes a first sensor configured to generate a movement signalaccording to a user movement, a second sensor configured to physicallycontact the user to generate a user bio-signal, a processor configuredto determine a user sleeping state using the generated movement signaland the generated user bio-signal in each of time periods and todetermine an operation state of another electronic device based on thedetermined sleeping state in respective time periods, and a communicatorconfigured to transmit a control command corresponding to the determinedoperation state to the another electronic device.

The processor may determine the user sleeping state as any one of anawakening stage, an NREM sleeping stage, and a REM sleeping stage usingthe generated movement signal and the generated user bio-signal.

The processor may smooth a user bio-signal generated for one periodusing a user bio-signal generated prior to the one period and comparethe smoothed user bio-signal with a certain value to determine a usersleeping state in the one period.

The electronic device may further include an input unit configured toreceive a sleep analysis start command, wherein the processor maycontrol the first sensor and the second sensor to generate a movementsignal and a user bio-signal, respectively in response to the sleepanalysis start command being received.

The input unit may receive a sleep analysis termination command, and theprocessor may calculate sleep efficiency from a time point in which thesleep analysis start command is received to a time point in which thesleep analysis termination command is received in response to the sleepanalysis termination command being received.

The first sensor may include at least one among an acceleration sensor,a gyro sensor, and a gravity sensor, and the second sensor may be aheartbeat sensor configured to measure a heartbeat of the user.

The heartbeat sensor may be a sensor configured to emit light togenerate a photoplethysmography (PPG) signal.

The processor may control the heartbeat sensor to periodically emitlight.

The processor may control the communicator to transmit a control commandcorresponding to a changed operation state of another electronic devicein response to the operation state being changed.

The electronic device may be a wearable device.

According to another aspect of an exemplary embodiment, a method ofcontrolling an electronic device includes generating a movement signalaccording to a user movement through a first sensor of the electronicdevice, generating a user bio-signal through a second sensor of theelectronic device that physically contacts the user, determining a usersleeping state using the generated movement signal and the generateduser bio-signal in each of time periods, determining an operation stateof another electronic device based on the determined sleeping state inrespective time periods, and transmitting a control commandcorresponding to the determined operation state to the anotherelectronic device.

The determining may include determining the user sleeping state as anyone of an awakening stage, an NREM sleeping stage, and a REM sleepingstage using the generated movement signal and the generated userbio-signal.

The determining may include smoothing a user bio-signal generated forone period using a user bio-signal generated prior to the one period andcomparing the smoothed user bio-signal with a certain value to determinea user sleeping state in the one period.

The method may further include receiving a sleep analysis start command,and controlling the first sensor and the second sensor to generate amovement signal and a user bio-signal, respectively in response to thesleep analysis start command being received.

The method may further include receiving a sleep analysis terminationcommand, and calculating sleep efficiency from a time point in which thesleep analysis start command is received to a time point in which thesleep analysis termination command is received in response to the sleepanalysis termination command being received.

The first sensor may include at least one among an acceleration sensor,a gyro sensor, and a gravity sensor, and the second sensor may be aheartbeat sensor configured to measure a heartbeat of the user.

The generating of the user bio-signal may include emitting light togenerate a photoplethysmography (PPG) signal by the heartbeat sensor.

The generating of the user bio-signal may include periodically emittinglight by the heartbeat sensor.

The transmitting may include transmitting a control commandcorresponding to a changed operation state of another electronic devicein response to the operation state being changed.

According to another aspect of an exemplary embodiment, there isprovided a computer-readable recording medium having recorded thereon aprogram a program which, when executed by a computer system, causes thecomputer system to execute a method of controlling an electronic device,the method including: generating a movement signal based on a usermovement by a first sensor of the electronic device; generating a userbio-signal by a second sensor of the electronic device that physicallycontacts the user; determining a user sleeping state using the generatedmovement signal and the generated user bio-signal in each of timeperiods; determining an operation state of another electronic devicebased on the determined sleeping state in respective time periods; andtransmitting a control command corresponding to the determined operationstate to the another electronic device.

According to another aspect of an exemplary embodiment, there isprovided an apparatus including: a first sensor configured to detect auser movement and generate a movement signal based on the detected usermovement; a second sensor configured to generate a user bio-signal, bybeing brought into physical contact with the user; and a microprocessorconfigured to control a peripheral device in correspondence with a usersleeping state by determining the user sleeping state based on thegenerated movement signal and the generated user bio-signal in each ofrespective time periods into which a portion of a user sleeping time issplit, and controlling an operating state of the peripheral device, ineach of the respective time periods, based on the determined sleepingstate by transmitting an operational command corresponding to thedetermined user sleeping state to the peripheral device, the operationalcommand being a command for controlling a certain function of theperipheral device.

The first sensor includes at least one among an acceleration sensor, agyro sensor, and a gravity sensor; and the second sensor includes aheartbeat measurement sensor.

The peripheral device includes at least one among a light source, a TV,a home temperature-controlling device, and a smartphone.

The apparatus further includes a display configured to display, on ascreen, at least one among the user sleeping state and the operatingstate of the peripheral device determined for a certain time period.

The apparatus further includes a display, and the processor isconfigured to analyze the user sleeping state by receiving a sleepanalysis start command for beginning a sleep analysis, at a first timepoint; acquiring, via the first sensor and the second sensor, themovement signal and the user bio-signal, respectively, based on thesleep analysis start command being received; receiving a sleep analysistermination command for ending the sleep analysis, at a second timepoint; and calculating a sleep efficiency of the user from the firsttime point to the second time point, and the display is configured todisplay the calculated sleep efficiency as at least one among a numericvalue and a graph.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and/or other aspects will become more apparent by describingcertain exemplary embodiments, with reference to the accompanyingdrawings, in which:

FIG. 1 is a diagram illustrating a sleep analysis system according to anexemplary embodiment;

FIG. 2 is a block diagram of a structure of an electronic deviceaccording to an exemplary embodiment;

FIGS. 3 and 4 are diagrams illustrating an electronic device accordingto an exemplary embodiment;

FIG. 5 is a diagram illustrating a control target device selection userinterface (UI) according to an exemplary embodiment;

FIG. 6 is a diagram of an interaction between an electronic device andanother user terminal device according to an exemplary embodiment;

FIG. 7 is a flowchart of a method of controlling an electronic deviceaccording to an exemplary embodiment;

FIGS. 8, 9, and 10 are flowcharts of a method of determining whether acurrent sleeping stage is a REM sleeping stage or an NREM sleeping stageof an electronic device according to an exemplary embodiment;

FIGS. 11 and 12 are flowcharts of a method of determining an awakeningstage of an electronic device according to an exemplary embodiment; and

FIG. 13 is a flowchart of a method of a method of analyzing a sleepingstate of an electronic device according to an exemplary embodiment.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

Certain exemplary embodiments are described in greater detail below withreference to the accompanying drawings.

In the following description, the same drawing reference numerals areused for the same elements even in different drawings. The mattersdefined in the description, such as detailed construction and elements,are provided to assist in a comprehensive understanding of exemplaryembodiments. Thus, it is apparent that exemplary embodiments can becarried out without those specifically defined matters. Also, well-knownfunctions or constructions are not described in detail since they wouldobscure exemplary embodiments with unnecessary detail.

It will be understood that, although the terms first, second, third etc.may be used herein to describe various elements, these elements shouldnot be limited by these terms. These terms are only used to distinguishone element from another element.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the inventiveconcept. As used herein, the singular forms “a,” “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” or “comprising” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements, orcomponents, but do not preclude the presence or addition of one or moreother features, integers, steps, operations, elements, components, orgroups thereof.

The terms, such as ‘unit’ should be understood as a unit that processesat least one function or operation and that may be embodied in ahardware manner, a software manner, or a combination of the hardwaremanner and the software manner. In addition, a plurality of ‘units’ maybe integrated into at least one module to be embodied as at least oneprocessor except for a ‘unit’ that needs to be embodied as a specifichardware.

FIG. 1 is a diagram illustrating a sleep analysis system 1000 accordingto an exemplary embodiment.

Referring to FIG. 1, the sleep analysis system 1000 may include anelectronic device 100, i.e., a user device, and other electronic deviceor devices 8, i.e., peripheral devices, which may be controlled by theelectronic device 100.

The electronic device 100 may analyze a user sleeping state in real timeand control the other electronic devices 8 according to the sleepingstate.

The electronic device 100 may be a device for analyzing a user sleepingstate, such as a watch type device illustrated in FIG. 1 and may beembodied in various forms such as a patch, glasses, a hat, a headband,an earphone, and a headset. However, the electronic device 100 is notlimited to a wearable device and may include a user device such as asmartphone.

The other electronic devices 8 may be devices that are operableaccording to control of the electronic device 100 and may be devicesthat are wirelessly communicable with the electronic device 100.

For example, the other electronic devices 8 may include at least oneamong a lighting device 10, a television (TV) 20, an air conditioner 30,a robot cleaner 40, an alarm clock 50, etc., which may change anoperation state according to control of the electronic device 100.

In detail, the other electronic devices 8 may change an operation stateaccording to a user sleeping state. For example, according to the usersleeping state, brightness of the lighting device 10 may be adjusted,the TV 20 may be powered off, a temperature of the air conditioner 30 ora heater may be adjusted, the robot cleaner 40 may be powered off or maybe controlled not to enter a room without a user, and/or the alarm clock50 may be controlled to make alarm sound at appropriate timing.

During control of the other electronic devices 8, the electronic device100 may directly transmit a command or may transmit a command through amanaging device that manages the other electronic devices 8. Themanaging device may be a home server, a smartphone, or the like and maybe any one of the other electronic devices 8.

According to another exemplary embodiment, the other electronic devices8 may request the electronic device 100 for information on a usersleeping state and may autonomously change an operation state accordingto the user sleeping state.

That is, when the electronic device 100 controls the other electronicdevices 8, various methods may be used as described above. Accordingly,information transmitted to control the other electronic devices 8 by theelectronic device 100 may include a command for directly changingoperation states of the other electronic devices 8 or includeinformation for autonomously changing operation states based oninformation received from the electronic device 100 by the otherelectronic devices 8.

The other electronic devices 8 illustrated in FIG. 1 are merely examplesand, thus, devices controllable by the electronic device 100 are notlimited thereto.

FIG. 2 is a block diagram of a structure of the electronic device 100according to an exemplary embodiment.

Referring to FIG. 2, the electronic device 100 may include a firstsensor 110, a second sensor 120, a communicator 130, and a processor140.

The first sensor 110 may generate a movement signal according to a usermovement. When the electronic device 100 is a wearable device, the firstsensor 110 may generate a movement signal according to the movement ofthe user who wears the electronic device 100. The electronic device 100may be disposed above or below an object (e.g., mattress) on which auser lies and the first sensor 110 may generate a movement signalaccording to movement of an object corresponding to the user movement.

The first sensor 110 may include at least one of, for example, a gyrosensor, a terrestrial magnetism sensor, an acceleration sensor, and apressure sensor.

The acceleration sensor may sense an inclination degree using gravity.That is, when a gravity value is 1 g in the case of sensing in avertical direction, if an inclination degree has a value less than 1 gwhen a corresponding object is obliquely inclined and if an inclinationdegree has a value of −1 g when the object is stood upside down. Theacceleration sensor may output a pitch angle and a roll angle using sucha principle. The acceleration sensor may be a 2-axis or 3-axis fluxgatesensor.

The terrestrial magnetism sensor is a device for measuring the intensityand direction of terrestrial magnetism. In particular, a terrestrialmagnetism sensor using fluxgate may be a fluxgate-type terrestrialmagnetism sensor. The terrestrial magnetism sensor may be a 2-axis or3-axis fluxgate sensor as the acceleration sensor.

The gyro sensor may sense angular speed and sense an inclination degreebased on a rotation axis using Coriolis force. The gyro sensor may useboth a mechanical sensor and an electronic sensor.

The pressure sensor may include at least one among a piezoelectricpressure sensor, a strain gauge pressure sensor, a capacitive pressuresensor, or the like. The piezoelectric pressure sensor may calculate apressure value according to a voltage value using a piezoelectricmaterial. The strain gauge pressure sensor may calculate a pressurevalue according to a resistance value of a strain gauge using the straingauge, the resistance value of which varies in response to tensile forceor compressive force. The strain gauge may include a wire or a spring.The capacitive pressure sensor may detect a capacity change according toa distance between electrodes, which is changed in response to anapplied pressure, using two electrodes to calculate a pressure value.

The electronic device 100 may generate a movement signal according to auser movement while being spaced apart from the user. The first sensor110 may be a device for generating a movement signal according to theuser movement based on an image captured by the user. For example,various multiple sensor and/or devices for generating a movement signalaccording to a user movement may be embodied as the first sensor 110.

The second sensor 120 may contact the user to generate a userbio-signal.

In detail, the second sensor 120 may be a device for generating a userbio-signal such as a photoplethysmography (PPG) signal, anelectrocardiogram (ECG) signal, a blood volume pulse (BVP) signal, aheart rate variability (HRV) signal, an electroencephalography (EEG)signal, an electromyography (EMG) signal, or an electrooculography (EOG)signal.

For example, the case in which the second sensor 120 is a device forgenerating a photoplethysmography (PPG) signal is described below inmore detail with reference to FIG. 3.

FIG. 3 is a diagram illustrating the electronic device 100 according toan exemplary embodiment. Referring to FIG. 3, the electronic device 100may be shaped like a watch and may include the second sensor 120disposed on a portion that a user body contacts.

The second sensor 120 may include a light emitter 121 and a lightreceiver 123.

The light emitter 121 may be a component for emitting light to a user.The light emitter 121 may be a light emitting diode (LED) or laserdiode.

The light emitter 121 may include a plurality of LEDs for emitting lightwith different wavelengths. For example, the light emitter 121 mayinclude a first LED for emitting light with a first wavelength and asecond LED for emitting light with a second wavelength that is differentfrom the first wavelength.

The light receiver 123 may receive light. The received light may bephotoelectrically-converted to generate a current signal. The lightreceiver 123 may be a photodiode.

As illustrated in FIG. 3, when the light emitter 121 and the lightreceiver 123 are disposed on a same side, the light receiver 123 mayreceive light that is emitted by the light emitter 121 and reflectedfrom the user. However, the arrangement of the light emitter 121 and thelight receiver 123 is not limited to FIG. 3 and, thus, the light emitter121 and the light receiver 123 may be arranged to face each other acrossa part of a user body (e.g., a wrist and a finger). The light receiver123 may receive light that is emitted from the light emitter 121 andpasses through the user.

The processor 140 may analyze contraction and relaxation degrees of ablood vessel of a user based on the amount of received light to measurea heartbeat of the user and calculate a heart rate based on theheartbeat of the user.

When the second sensor 120 is a sensor for measuring a heartbeat, thesecond sensor 120 may be a heartbeat sensor.

As described above, when light is emitted to measure a heartbeat, theprocessor 140 may control the second sensor 120 to intermittently emitlight.

For example, when one period for determining one sleeping state is 30seconds, the processor 140 may control the second sensor 120 to emitlight only for six seconds of the 30 seconds and not to emit light forthe remaining 24 seconds. The processor 140 may calculate an averageheart rate based on a heartbeat for six seconds and determine thecalculated average heart rate as a heart rate of one period.

Light may be intermittently emitted rather than being continuouslyemitted to reduce power consumption.

The electronic device 100 may charge a battery through a chargingterminal 160 and the processor 140 may control the second sensor 120 toadjust time for emitting light according to a battery charging state ofthe electronic device 100.

For example, when a battery charging amount is greater than or equal toa preset amount, the processor 140 may control the second sensor 120 tocontinuously emit light. When a battery charging amount is less than apreset amount, the processor 140 may control the second sensor 120 tointermittently emit and to reduce time for emitting light as a batterycharging amount is reduced.

The user may manually set time for emitting light.

The communicator 130, e.g., a transceiver or a communication interface,may be a component for communication with various other electronicdevices. The communicator 130 may perform communication using variouscommunication methods such as near field communication (NFC), wirelessLAN, infrared (IR) communication, ZigBee communication, Wi-Fi, andBluetooth. Other electronic devices may be home appliances such as alight device, a TV, and an air conditioner or a smartphone, as describedwith reference to FIG. 1.

The communicator 130 may transmit a control command corresponding to anoperation state that is determined based on a user sleeping state toanother electronic device 8. The communicator 130 may transmit a sleepanalysis result to another electronic device 8. The communicator 130 mayreceive state information from another electronic device 8.

The processor 140 may be a component for controlling an overalloperation of the electronic device 100.

For example, the processor 140 may include a microprocessor, a centralprocessing unit (CPU), a rapid access memory (RAM), a read only memory(ROM), and a system bus. The ROM may store a command set for systembooting and the CPU may copy an operating system (OS) stored in astorage of the electronic device 100 according to a command stored inthe ROM and execute the OS to boot a system. When booting is completed,the CPU may copy various applications stored in the storage to an RAM,execute the applications, and perform various operations. For example,the processor 140 may include one CPU or a plurality of CPUs (DSP, SoC,etc.).

The processor 140 may determine a user sleeping state using a movementsignal and a user bio-signal that are generated for a preset period. Forexample, when a preset period is 30 seconds, an operation of determininga sleeping state is every 30 seconds.

The processor 140 may determine a user sleeping state as any one ofthree-stage sleeping state. The three-stage sleeping state may include afirst sleeping state, a second sleeping state, and a third sleepingstate.

The first sleeping state, the second sleeping state, and the thirdsleeping state may correspond to a sleep state that becomes deeper. Forexample, the first sleeping state, the second sleeping state, and thethird sleeping state may be “awakening stage, REM sleeping stage, anddeep sleeping stage”, “awakening stage, REM sleeping stage, and NREMsleeping stage”, “slight sleeping stage, REM sleeping stage, and NREMsleeping stage”, or “slight sleeping stage, REM sleeping stage, and deepsleeping stage”.

The processor 140 may determine that a current sleeping state is a firstsleeping state based on a movement signal generated by the first sensor110. For example, when movement intensity measured based on a movementsignal at a specific period is greater than or equal to a preset degree,the current sleeping state may be determined as the first sleepingstate. That is, when movement is high, the current sleeping state may bedetermined as awakening or a slight sleeping state.

The processor 140 may smooth a movement signal generated for one periodusing the movement signal generated prior to the one period and comparethe smoothed user bio-signal with a preset value to determine a usersleeping state in the one period.

The processor 140 may determine what the current sleeping state is thebased on the user bio-signal generated by the second sensor 120. Forexample, when a heart rate that is measured based on a user bio-signalin a specific period is greater than or equal to a preset value, thecurrent sleeping state may be determined as the second sleeping state.

The processor 140 may smooth a user bio-signal generated for one periodusing a user bio-signal generated prior to the one period and comparethe smoothed user bio-signal with a preset value to verify a usersleeping state in the one period.

Upon verifying that the current sleeping state is the first sleepingstate in a specific period, the processor 140 may determine that thecorresponding period is the first sleeping state irrespective of theprior determination of the current sleeping state as the second sleepingstate. In other words, when the first sleeping state and the secondsleeping state are simultaneously determined in a specific period,determination as the second sleeping state may be disregarded and thecurrent sleeping state may be determined as the first sleeping state.That is, the processor 140 may determine a sleeping state by firstconsidering a user movement.

Accordingly, the processor 140 may perform both an operation ofdetermining the first sleeping state and an operation of determining thesecond sleeping state. Alternatively, the processor 140 may perform theoperation of determining the first sleeping state to determine thecurrent sleeping state as the first sleeping state, and does not furtherperform the operation of determining the second sleeping state, in orderto reduce memory consumption for sleeping state analysis processing.

Upon determining the current sleeping state is not the first sleepingstate or the second sleeping state in a specific period as theaforementioned analysis result, the processor 140 may determine that aspecific period is the third sleeping state.

Upon determining a sleeping state, the processor 140 may determineoperation states of another electronic device 8 based on the determinedsleeping state.

The case in which another electronic device 8 is a robot cleaner isdescribed below as an example. Upon determining that a sleeping state ina specific period is determined as the first sleeping state or thesecond sleeping state, the processor 140 may determine an operationstate of the robot cleaner 40 as a power off state. When the sleepingstate is determined as the third sleeping state, the operation state ofthe robot cleaner 40 may be determined as a power on state. That is, therobot cleaner 40 is not operated in a slight sleeping state and sincethe sleeping user is insensitive in a deep sleeping state, the robotcleaner 40 may be operated in the deep sleeping state.

As described above, the processor 140 may determine an operation stateof another electronic device 8 and control the communicator 130 totransmit a control command corresponding to the determined operationstate to another electronic device 8.

The control command may be transmitted every period in response to theoperation state that is determined every period.

According to another exemplary embodiment, the control command may betransmitted only when an operation state is to be changed rather thanbeing transmitted every period. In detail, when an operation state ofanother electronic device 8 is determined to be changed, the processor140 may control the communicator 130 to transmit a control commandcorresponding to the changed operation state.

For example, upon determining an operation state of a robot cleaner 40as another electronic device 8 as a power off state in a first period,the processor 140 may transmit a control command corresponding to thepower off state and, then, if it is determined that the operation stateof the robot cleaner 40 is a power off state in a second period, theprocessor 140 does not transmit a control command corresponding to thepower off state of the second period to the robot cleaner 40. Upondetermining the operation state of a robot cleaner 40 in a third periodas a power on state, the processor 140 may detect that the operationstate is changed and transmit a control command corresponding to a poweron state to the robot cleaner 40.

The electronic device 100 may receive selection of sleeping analysisstart, sleeping analysis termination, a device as a control target, andso on according to a user input through an input unit.

FIG. 4 is a diagram showing an input unit 150 of the electronic device100 according to an exemplary embodiment.

The input unit 150 may be a component for receiving a user command andmay include a touchscreen as illustrated in FIG. 4. A touchscreen may bea device for performing a display function and receiving a user input.However, exemplary embodiments are not limited thereto and the inputunit 150 may include a physical button, or other appropriate inputmeans.

Upon receiving a sleep analysis start command, the processor 140 maycontrol the first sensor 110 and the second sensor 120 to generate amovement signal and a user bio-signal, respectively. For example, thesleep analysis start command may be generated based on the user inputprovided through input unit 150 to specify a period of time during whichthe sleep analysis is to be performed or to specify when the sleepanalysis is to be started. However, this is not limiting.

After receiving the sleep analysis start command, the processor 140 maydetermine a sleeping state of a user every preset period and determinean operation state of another electronic device 8 based on the sleepingstate determined every preset period, as described above.

Upon receiving a sleep analysis termination command, the processor 140may calculate sleep efficiency starting from a time point at which thesleep analysis start command is received to a time point at which asleep analysis termination command is received. The sleep analysistermination command may be generated based on the user input providedthrough the input unit 150. For example, the sleep analysis terminationcommand may be generated based on the input by the user to specify aperiod of time during which the sleep analysis is to be performed or tospecify when the sleep analysis is to be terminated. However, this isnot limiting.

The sleep efficiency refers to an index indicating a degree by which auser tosses and turns for a sleep period. Accordingly, the processor 140may calculate sleep efficiency based on the movement signal generated bythe first sensor 110 during a sleep period. The calculation result maybe displayed on, for example, a display of the electronic device 100.

After receiving the sleep analysis start command, the processor 140 maydetermine an operation state of another electronic device 8 based on thesleeping state determined every preset period, as described above. Theanother electronic device 8 may be pre-selected by a user. According toan exemplary embodiment, the user may be provided with a UI forselecting a device to be controlled during sleep. However, this is notlimiting and the user may be provided with menus, icons or imagesshowing the various devices, etc.

The processor 140 may provide a control target device selection UI tothe user through a display (e.g., a touchscreen of FIG. 4) of theelectronic device 100, which is described below with reference to FIG.5.

FIG. 5 is a diagram illustrating a control target device selection UI510 according to an exemplary embodiment.

A user may select a device to be controlled during sleep through thecontrol target device selection UI 510. The control target deviceselection UI 510 may be displayed on, for example, a touchscreen of theelectronic device 100.

As illustrated in FIG. 5, when ‘TV’ and ‘lighting device’ are selected,the processor 140 may control the communicator 130 to transmit a controlcommand corresponding to the determined sleeping state to a TV 20 and alighting device 10. However, this is not limiting and the electronicdevice 100 may automatically select and control various peripheraldevices based on the detected sleeping state of the user, currentenvironmental conditions, etc.

In the above example, although the case in which the electronic device100 directly controls another electronic device 8 and a user commandsuch as a sleep analysis start command is input directly to theelectronic device 100 has been described, the aforementioned functionmay be performed by another user device instead of the electronic device100.

The another user device may be another user terminal device, asdescribed below in more detail with reference to FIG. 6.

FIG. 6 is a diagram of an interaction between the electronic device 100and another user terminal device 200 according to an exemplaryembodiment.

Referring to FIG. 6, the electronic device 100 may communicate with theuser terminal device 200 via wireless or wired communication. Forexample, the electronic device 100 may be connected to the user terminaldevice 200 via Bluetooth.

The electronic device 100 may perform an operation of generating themovement signal and the user bio-signal through the first sensor 110 andthe second sensor 120 and determination of a user sleeping state may beperformed by the user terminal device 200 that receives the generatedsignals. In addition, decision of an operation state of anotherelectronic device 8 according to a user sleeping state and transmissionof a control command corresponding to the operation state may beperformed by the user terminal device 200.

Alternatively, the electronic device 100 may perform determination of auser sleeping state and the user terminal device 200 may perform thetransmission of a control command corresponding to the operation state.

A user command such as a sleep analysis start command and a sleeptermination start command may be input from the user terminal device 200instead of the electronic device 100 and transmitted to the electronicdevice 100, the UI 510 described with reference to FIG. 5 may bedisplayed on the user terminal device 200, and management of a controltarget device may be performed by the user terminal device 200. Thecalculated sleep efficiency may be displayed on the user terminal device200. For example, the calculated sleep efficiency may be displayed as anumerical value or a graph, in relation to time.

According to the exemplary embodiment, when the electronic device 100 isa small size wearable device and has a lower capacity memory, processingthat requires a higher memory consumption may be performed by the userterminal device 200 instead of the electronic device 100. When theelectronic device 100 is a device that does not include a display and aninput unit, a user may view various information items and receivevarious user commands through the user terminal device 200 including adisplay and an input unit. When the electronic device 100 supports onlyshort-range wireless communication such as Bluetooth, it may beimpossible to directly control another faraway electronic device.Accordingly, the user terminal device 200 for supporting long-rangewireless communication such as Wi-Fi as well as short-range wirelesscommunication such as Bluetooth may control another faraway electronicdevice based on information (e.g., a movement signal and a userbio-signal) received from the electronic device 100.

FIG. 7 is a flowchart of a method of controlling an electronic deviceaccording to an exemplary embodiment.

Referring to FIG. 7, a movement signal according to a user movement maybe generated through the first sensor 110 of the electronic device 100(operation S710).

A user bio-signal may be generated through the second sensor 120 of theelectronic device 100 that contacts a user (operation S720).

The first sensor 110 and the second sensor 120 may be set tocontinuously generate the movement signal and the user bio-signal.Alternatively, the first sensor 110 and the second sensor 120 may be setto generate the signals only at a predetermined time point. For example,the user may pre-set a time period (e.g., from 11 pm to 7 am) in whichthe user mainly sleeps as sleep analysis time in the electronic device100. The signals may be generated from when the user inputs a sleepanalysis start command and until the user inputs a sleep analysistermination command. When the sleep analysis start command is input and,then, it is determined that the user is completely awaken throughmovement analysis through the first sensor 110, sleep analysis may beterminated.

A user sleeping state may be determined using the generated movementsignal and the generated user bio-signal every preset period (operationS730).

An operation state of another electronic device 8 may be determinedbased on the determined sleeping state every preset period (operationS740).

The another electronic device 8 may be a device pre-registered in theelectronic device 100. The operation state according to the determinedsleeping state may be different according to respective electronicdevices.

For example, when another electronic device 8 is a smartphone, if acurrent sleeping state is determined to be a REM sleeping stage or aNREM sleeping stage, the current operation state may be determined to bea mute state.

As another example, when another electronic device 8 is a heatingdevice, the electronic device 100 may determine an operation state ofthe heating device as a temperature state appropriate for an awakeningstage, a REM sleeping stage, or a NREM sleeping stage.

As another example, when another electronic device 8 is an audio device,an operation state of the audio device may be determined based on thesleep duration time and sleeping state of the electronic device 100.When user wake-up is determined to be imminent based on sleep durationtime so far and a current sleeping state, the electronic device 100 maydetermine an operation state of the audio device as a preset musicon-state. The preset music may be preset as dulcet music by the user. Asanother example, when another electronic device 8 is an electric ricecooker or a coffee machine, upon determining that user wake-up isimminent, the electronic device 100 may determine an operation state ofthe electric rice cooker or the coffee machine as an on-state.

As another example, when another electronic device 8 is a securitydevice, upon determining that a sleeping state is a REM sleeping stageor a NREM sleeping stage, the electronic device 100 may determine thesecurity device in an on-state.

The electronic device 100 may transmit a control command correspondingto the determined operation state to another electronic device 8(operation S750).

The electronic device 100 may perform control to transmit the controlcommand corresponding to the operation state determined every period toanother electronic device 8 every period or to transmit the controlcommand only when an operation state is to be changed from thepreviously set operation state.

Another electronic device 8 that receives the control command may changethe operation state according to the control command.

For example, in the case of a TV 20, when a control commandcorresponding to an operation state of power-off is received, power maybe off. When power is already off, a power-off state may be maintainedwithout changes.

The electronic device 100 may determine whether the control command istransmitted, based on a distance with another electronic device 8. Indetail, the electronic device 100 may determine the distance withanother electronic device 8 using received signal strength indication(RSSI) from another electronic device 8. The electronic device 100 maytransmit the control command only when the distance with anotherelectronic device 8 is less than a preset distance. For example, whenanother electronic device 8 is a TV 20, if a distance between the TV 20and a user who wears the electronic device 100 is greater than or equalto a preset distance, the user is not affected by noise of the TV 20and, thus, it may not be necessary to power off the TV 20. In addition,other family members may view a TV 20 in a living room while the user ofthe electronic device 100 sleeps and, in this case, the TV 20 does nothave to be automatically powered off.

As such, whether a control command for controlling another electronicdevice 8 is transmitted may be determined according to a situation andthe characteristics of another electronic device 8. Alternatively, evenif receiving the control command, another electronic device 8 may beoperated to disregard the control command according to a situation andthe characteristics of another electronic device 8, as described above.

According to another exemplary embodiment, the electronic device 100 mayrequest another preset electronic device to transmit state informationand receive the state information from other electronic devices. Theelectronic device 100 may recognize current operation states of otherelectronic devices based on the received state information and transmitthe control command to other electronic devices only when an operationstate needs to be changed according to a user sleeping state. Forexample, upon recognizing that a TV 20 is in an off-state based on stateinformation received from the TV 20, the electronic device 100 may nottransmit a control command for powering off the TV 20 according to theuser sleeping state.

According to exemplary embodiments, operation states of electronicdevices may be controlled in real time according to a user sleepingstate and, thus, user convenience may be further improved.

FIGS. 8 to 10 are flowcharts of a method of determining whether thecurrent sleeping stage is a REM sleeping stage or a NREM sleeping stageof the electronic device 100 according to an exemplary embodiment.

FIG. 8 is a flowchart of extraction and collection of average HR data(average heart rate data).

Referring to FIG. 8, first, the processor 140 may collect calculatedaverage HR data from an ECG sensor or a PPG sensor (operation S810). Inthis case, average (mean) HR (mHR) of an HR data group for six secondsmay be calculated in a period of 30 seconds (1 epoch). However, this isnot limiting.

The processor 140 may store the collected mHR data in a storage forcollecting mHR data (operation S820).

The processor 140 may determine whether the number (n) of the stored mHRdata is greater than or equal to 20 (operation S830). This may be basedon the case in which the number of at least required mHR data forfeature extraction is preset to 20. However, this is not limiting.

When the number (n) of the stored mHR data is less than 20 (operationS830, N), the average HR data may be continuously collected.

When the number (n) of the stored mHR data is greater than or equal to20 (operation S830, Y), the processor 140 may determine whether thenumber (n) of the stored mHR data is greater than or equal to 60(operation S840). This may be based on the case in which the number ofmHR data for calculating is preset to 60. However, this is not limiting.

When the number (n) of the stored mHR data is less than 60 (operationS840, N), 20 mHR data may be copied to 60 (operation S850).

When the number (n) of the stored mHR data is greater than or equal to60 (operation S840, Y), the mHR data may be stored in a storage of mHRdata of 60 epochs (operation S860).

When the number of mHR data before being copied is 60 epochs, a memoryof the storage of the mHR data may be shifted to 59 from 60 (operationS870). However, this is not limiting.

FIG. 9 is a flowchart of feature detection and stage estimation.

Referring to FIG. 9, previous mHR data (30 epochs) and current mHR data(60 epochs) may be aligned in one memory and a smoothing algorithm maybe applied (window size is fixed to 60) (operation S910). This isbecause slight change or discontinuity that adversely affects data ispresent due to noise and, thus, such change or discontinuity needs to beweakened or removed. This operation may be processing in a frequencydomain and, thus, a high frequency component may be removed by a lowpass filter. However, this is not limiting.

The processor 140 may determine whether a result obtained by removing 30epochs from the smoothing algorithm result is less than a value obtainedby dividing ‘average of mHR group+past threshold value’ by 2 (operationS920). However, this is not limiting. The operation S920 may be aprimary comparing and separating operation.

When the result obtained by removing 30 epochs from the smoothingalgorithm result is less than a value obtained by dividing ‘average ofmHR group+past threshold value’ by 2 (operation S920, Y), an NREMsleeping stage may be determined (operation S930). When the resultobtained by removing 30 epochs from the smoothing algorithm result isnot less than a value obtained by dividing ‘average of mHR group+pastthreshold value’ by 2 (operation S920, N), a REM sleeping stage may bedetermined (operation S940).

The processor 140 may calculate a difference between a resulting memoryfor removing 30 epochs from the smoothing algorithm result and aresulting memory for containing the smoothing algorithm result value(operation S950). The memory for removing 30 epochs from the smoothingalgorithm result may be pS_MeanHR[i] and the resulting memory forcontaining the smoothing algorithm result value may be pSS_MeanHR[i].That is, pDiff_S_MeanHR[i]=pS_MeanHR[i]−pSS_MeanHR[i].

The processor 140 may determine whether the difference between thememory for removing 30 epochs from the smoothing algorithm result andthe resulting memory for containing the smoothing algorithm result valueis less than 0 (operation S960). However, this is not limiting. Theoperation S960 may be a secondary comparing and separating operation.

When the difference between the memory for removing 30 epochs from thesmoothing algorithm result and the resulting memory for containing thesmoothing algorithm result value is less than 0 (operation S960, Y), aNREM sleeping stage may be determined (operation S970). When thedifference between the memory for removing 30 epochs from the smoothingalgorithm result and the resulting memory for containing the smoothingalgorithm result value is not less than 0 (operation S960, N), a REMsleeping stage may be confirmed (operation S980).

FIG. 10 is a flowchart of estimated stage correction and final resultdeduction.

Referring to FIG. 10, the processor 140 may align 5 epochs of a previousstage data and 10 epochs of a current stage in one memory and, then,apply the smoothing algorithm (a window size is fixed to 10) (operationS1010). Here, only 5 epochs of the result of 10 epochs may be applied tothe result. However, this is not limiting. The REM sleep has continuityand, thus, only a specific level period after smoothing may be used.

The processor 140 may determine whether a current level is less than awake level (operation S1020). In this case, a memory of first 5 epochsmay be discarded from a REM stage memory (10 epochs of REM stagememory). However, this is not limiting.

When the current level is not less than the wake level, the currentstate may be finally determined as a NREM sleeping stage (operationS1030) and when the current level is less than the wake level, thecurrent state may be finally determined as REM sleeping stage (operationS1040). Here, first 5 epochs of 10 epochs in the REM sleeping stage maybe determined as a true value and a stage value of the fifth epoch mayreturn to result data. However, this is not limiting.

FIGS. 11 and 12 are flowcharts of a method of determining an awakeningstage of the electronic device 100.

FIG. 11 is a flowchart of acceleration data collection, feature dataextraction, and stage estimation.

Referring to FIG. 11, acceleration (X, Y, and Z axes) data may betransmitted at a period of 10 Hz (operation S1110). However, this is notlimiting.

The processor 140 may process acceleration data via an IIR SOS filterand, then, acquire the sum of three-axis data (operation S1120). Abandwidth of the IIR filter may be 0.5 Hz and pOutput_ACC_Sum[g_nRawDataCnt]=Abs (Filter(X)+Abs(Filter(X))+Abs(Filter(X))). However,this is not limiting.

Similarly to operation S1110 and operation S1120, the acceleration datamay be collected and feature data extraction and sleeping stageestimation may be performed.

In detail, the processor 140 may determine whether the number of datafor 30 seconds is greater than or equal to 300 (operation S1130). Thatis, g_nRawDataCnt==SAMPLE_DATA_LENGTH (=300) may be satisfied. One epochis 30 seconds and a sampling frequency of 10 Hz is used and, thus, 300data is required. However, this is not limiting.

When the number of data for 30 seconds is not greater than or equal to300 (operation S1130, N), the method may return back to operation S1110.

When the number of data for 30 seconds is greater than or equal to 300(operation S1130, Y), the processor 140 may apply a weight to data ofthe sum result to calculate a median algorithm and average calculationin order to extract the feature data (operation S1140). The feature datamay be extracted based on Activity=0.4*median (sum_data)+0.6*mean(sum_data).

The processor 140 may determine whether a length of activity is greaterthan or equal to 10 epochs (operation S1150). This may be based on thecase in which a minimum epoch for estimating an awakening stage, i.e.,the awakening stage, is set to 10 epochs. However, this is not limiting.

When the length of activity is not greater than or equal to 10 epochs(operation S1150, N), the method may return back to operation S1110.

When the length of activity is greater than or equal to 10 epochs(operation S1150, Y), the processor 140 may align data of previousfeature data of 5 epochs and current feature data of 10 epochs in onememory and apply a smoothing algorithm (a window size is fixed to 10)(operation S1160). The smoothing algorithm may be processed and, thenfirst 5 epochs of a memory may be deleted. However, this is notlimiting.

The processor 140 may determine whether the length of feature data towhich smoothing is applied is equal to 15 epochs (operation S1170). Inthis step, since the smoothing algorithm is used during the previousoperation, 5 epochs may be further received and calculated. However,this is not limiting.

When the length of feature data to which smoothing is applied is notequal to 15 epochs (operation S1170, N), the method may return back tooperation S1110.

When the length of feature data to which smoothing is applied is equalto 15 epochs (operation S1170, Y), the processor 140 may determinewhether a value of the feature data to which smoothing is applied isgreater than or equal to a specific movement value (operation S1180).

When the value of the feature data to which smoothing is applied isgreater than or equal to the specific movement value (operation S1180,Y), the processor 140 may determine a current state as an awakeningstage (operation S1190).

When the value of the feature data to which smoothing is applied is notgreater than or equal to the specific movement value (operation S1180,N), the processor 140 may set a threshold in order to determine anawakening stage and a sleep state (operation S1191).

Threshold 1 may be set using an average value of the smoothed featuredata and a previous threshold value; Threshold1=(Mean(pFeatureData_Smooth, FEATURE_SIZE)+g_dUpdata_Threshold)/2.0.However, this is not limiting.

Threshold 2 may be set using data of previous 2 epochs; Threshold2=((pFeatureData_Smooth[i−2]+pFeatureData_Smooth[i−1]/2.0)+0.5. However,this is not limiting.

The processor 140 may determine whether feature data to which smoothingis applied is less than the two thresholds (operation S1192). Twoconditions are as follows.

Condition 1=(pFeatureData_Smooth[i]<g_dThreshold+(g_dThreshold*0.15)

Condition 2=(pFeatureData_Smooth[i]<Threshold2)

When feature data to which smoothing is applied is not less than the twothresholds (operation S1192, N), the processor 140 may determine acurrent state as an awakening stage (operation S1193).

When feature data to which smoothing is applied is less than the twothresholds (operation S1192, Y), the processor 140 may determine acurrent stage as a NREM sleeping stage (operation S1194).

FIG. 12 is a flowchart of estimated stage correction and final resultdeduction.

Referring to FIG. 12, upon resetting and starting an awakening stageregion, the processor 140 may set 10 epochs as Wake (operation S1210);pEstimated_Wake [0:9]=Wake. However, this is not limiting.

A period in which a high value of feature data is continuously shown inan awakening stage may be set to ‘0’ in an awakening stage and may bechanged to a NREM sleeping stage. When wake is continuously generated in5 epochs or more in a wake state group, either side of wake states ofthe wake state group may be set to ‘0’ and changed to a NREM sleepingstage.

The processor 140 may determine whether wake and sleep simultaneouslyoccur in the same epoch (operation S1220).

When wake and sleep simultaneously occur in the same epoch (operationS1220, Y), priority may be applied to wake (operation S1230).

When wake-up and sleeping do not simultaneously occur in the same epoch(operation S1220, N), the processor 140 may change an unknown periodsuch that a previous event is subsequent to the period (operationS1240).

The processor 140 may generate a final event according topEstimated_Wake+pEstimated_Sleep (operation S1250). In this case, first5 epochs 10 epochs of final event may be determined as a true value. Astage value of fifth epoch may return to result data. However, this isnot limiting.

FIG. 13 is a flowchart of a method of analyzing a sleeping state of theelectronic device 100 according to another exemplary embodiment.

Referring to FIG. 13, a block 13A relates to a method of estimating aREM sleeping stage and a block 13B relates to a method of a estimatingan awakening stage and a method of acquiring sleep efficiency in realtime or near real time.

Here, Epoch Length is 30 seconds and a used signal is ECG (Heart Rate,20% of period per epoch is used). However, this is not limiting.

In estimation of a REM sleeping stage, a recent personal sleepingdatabase may be used (operation S1310). The recent personal sleepingdatabase may be configured by MeanHR and may be used when sleepefficiency is 70% or more. However, this is not limiting.

The processor 140 may collect real-time HR data (operation S1311), storedata (operation S1312), and determine whether data of 20 epochs or moreis collected (operation S1313). However, this is not limiting. When dataof 20 epochs or more is not collected (operation S1313, N), the methodmay return back to operation S1311.

When data of 20 epochs or more is collected (operation S1313, Y), theprocessor 140 may MeanHR-calculate the stored data and merge thecalculated data with a sleeping DB (operation S1320).

The processor 140 may perform Butterworth IIR filter design using aspecific object (operation S1321). The processor 140 may performZero-phase digital filtering (0.1 to 0.5 Hz) (operation S1322). However,this is not limiting. The processor 140 may estimate a REM sleepingstage (operation S1323).

The processor 140 may collect acceleration data in X, Y, and Z axes(operation S1340). The processor 140 may store data for 30 seconds(logic is performed in a unit of 1 epoch) (operation S1341). However,this is not limiting.

The processor 140 may calculate SUM (three-axis data, 0.5 Hz IIR Filter,and absolute value) according to sum_data=[abs(Y)+abs(Z)] (operationS1330). However, this is not limiting.

The processor 140 may extract feature data (operation S1331). In detail,the feature data may be extracted based on Activity=0.4*median(sum_data)+0.6*mean(sum_data).

The processor 140 may smooth (Moving Average) Activity in a unit of 10epochs (operation S1332).

The processor 140 may determine a threshold with data of 2 epochs priorto a current state (operation S1333). However, this is not limiting. Anawakening stage may be estimated (operation S1334). Based on the result,the awakening stage is excluded from the REM sleeping stage (operationS1324).

The processor 140 may finally estimate a REM sleeping stage (operationS1325). In this case, only a previous stage of 10 epochs may be used.However, this is not limiting.

That is, input data of the aforementioned algorithm may use average HRdata and only a period of 20% per 1 epoch (30 seconds) may be used incalculation. However, this is not limiting. A recent user sleeping DBmay use data including average HR and use only a data group with sleepefficiency of 70% or more. However, this is not limiting.

In detail, the aforementioned algorithm may estimate a REM sleepingstage using average HR and estimate an awakening stage usingacceleration data. The awakening stage may be set with higher prioritythan the REM sleeping stage and a period that is not the awakening stageor the REM sleeping stage may be set as a deep sleep period. A REMextraction algorithm may include extracting feature to estimate a REMsleeping stage and performing a post-processing procedure to acquire aREM region. Wake region detection may include extracting feature likethe REM extraction procedure and then executing a moving averagefunction every 10 epochs to determine a threshold. However, this is notlimiting. The wake region may be calculated based on the threshold.After this procedure is completely performed, the number of wake statesmay be estimated to acquire sleep efficiency and a sleeping stage resultmay be output. In an exemplary embodiment, a sleeping state might not berecognized for first 10 minutes and a current sleeping state may berecognized after 5 minutes. Accordingly, a delay time for outputting theuser sleeping state analysis result may be from 5 to 10 minutes or less.However, this is not limiting.

For example, the recent sleeping information of a user is displayed onthe electronic device 100 or the user terminal device 200 and is used inalgorithm calculation to acquire reusability of a memory. While a usersleeps, the electronic device 100 may control other various electronicdevices. When a battery of the electronic device 100 is insufficient,measurement time of a heart rate monitoring (HRM) sensor may be manuallyor automatically adjusted and, thus, a sleeping state is also used whilethe battery is effectively used.

The exemplary embodiments may be embodied by a computer or similardevice readable recording medium using software, hardware, or acombination thereof. In a hardware configuration, an exemplaryembodiment may be achieved by at least one of application specificintegrated circuits (ASICs), digital signal processors (DSPs), digitalsignal processing devices (DSDPs), programmable logic devices (PLDs),field programmable gate arrays (FPGAs), processors, controllers,microprocessors, and an electronic unit for other functions. In somecases, exemplary embodiments may be embodied as the processor 140without changes. In a software configuration, exemplary embodiments suchas a procedure and a function may be embodied as separate softwaremodules. Each of the software modules may perform one or more functionsand operations described in the specification.

The method of controlling an electronic device according to the variousexemplary embodiments may be stored in a non-transitory readable medium.The non-transitory readable medium may be installed and used in variousdevices.

The non-transitory computer-readable medium is a medium thatsemi-permanently stores data and from which data is readable by adevice, but not a medium that stores data for a short time, such asregister, a cache, a memory, and the like. In detail, programs forexecuting the aforementioned various methods may be stored in thenon-transitory computer-readable medium, for example, a compact disc(CD), a digital versatile disc (DVD), a hard disc, a Blu-ray disc, auniversal serial bus (USB), a memory card, a read only memory (ROM), andthe like.

The foregoing exemplary embodiments and advantages are merely exemplaryand are not to be construed as limiting. The present teaching can bereadily applied to other types of apparatuses. The description ofexemplary embodiments is intended to be illustrative, and not to limitthe scope of the claims, and many alternatives, modifications, andvariations will be apparent to those skilled in the art.

What is claimed is:
 1. An electronic device comprising: a first sensorconfigured to generate a movement signal corresponding to a usermovement; a second sensor configured to physically contact the user togenerate a user bio-signal; a processor configured to determine a usersleeping state using the generated movement signal and the generateduser bio-signal in each of time periods, and determine an operationstate of another electronic device based on the determined sleepingstate in respective time periods; and a communicator configured totransmit a control command corresponding to the determined operationstate to the another electronic device.
 2. The electronic device asclaimed in claim 1, wherein the processor is configured to determine theuser sleeping state as any one of an awakening stage, a non-rapid eyemovement (NREM) sleeping stage, and a rapid eye movement (REM) sleepingstage using the generated movement signal and the generated userbio-signal.
 3. The electronic device as claimed in claim 1, wherein theprocessor is configured to smooth the user bio-signal generated for oneof the time periods using the user bio-signal generated prior to the oneof the time periods, and compare the smoothed user bio-signal with acertain value to determine the user sleeping state in the one of thetime periods.
 4. The electronic device as claimed in claim 1, furthercomprising an input unit configured to receive a sleep analysis startcommand, wherein the processor is configured to control the first sensorand the second sensor to generate the movement signal and the userbio-signal, respectively, in response to the sleep analysis startcommand being received.
 5. The electronic device as claimed in claim 4,wherein the input unit is configured to receive a sleep analysistermination command, and the processor is configured to calculate sleepefficiency from a time point at which the sleep analysis start commandis received, to a time point at which the sleep analysis terminationcommand is received, in response to the sleep analysis terminationcommand being input.
 6. The electronic device as claimed in claim 1,wherein the first sensor comprises at least one among an accelerationsensor, a gyro sensor, and a gravity sensor; and the second sensorcomprises a heartbeat sensor configured to measure a heartbeat of theuser.
 7. The electronic device as claimed in claim 6, wherein theheartbeat sensor is a sensor configured to emit light to generate aphotoplethysmography (PPG) signal.
 8. The electronic device as claimedin claim 7, wherein the processor is configured to control the heartbeatsensor to emit the light periodically.
 9. The electronic device asclaimed in claim 1, wherein the processor is configured to determinewhether the operation state of the another electronic device is to bechanged based on the user sleeping state determined in each of the timeperiods, and control the communicator to transmit the control commandcorresponding to a changed operation state to the another electronicdevice in response to determining that the operation state of theanother electronic device is to be changed based on the determined usersleeping state in a certain time period.
 10. The electronic device asclaimed in claim 1, wherein the electronic device comprises auser-wearable device.
 11. A method of controlling an electronic device,the method comprising: generating a movement signal based on a usermovement by a first sensor of the electronic device; generating a userbio-signal by a second sensor of the electronic device that physicallycontacts the user; determining a user sleeping state using the generatedmovement signal and the generated user bio-signal in each of timeperiods; determining an operation state of another electronic devicebased on the determined sleeping state in respective time periods; andtransmitting a control command corresponding to the determined operationstate to the another electronic device.
 12. The method as claimed inclaim 11, wherein the determining the user sleeping state comprisesdetermining the user sleeping state as any one of an awakening stage, anon-rapid eye movement (NREM) sleeping stage, and a rapid eye movement(REM) sleeping stage using the generated movement signal and thegenerated user bio-signal.
 13. The method as claimed in claim 11,wherein the determining the user sleeping state comprises: smoothing theuser bio-signal generated for one of the time periods using the userbio-signal generated prior to the one of the time periods; and comparingthe smoothed user bio-signal with a certain value to determine the usersleeping state in the one of the time periods.
 14. The method as claimedin claim 11, further comprising: receiving a sleep analysis startcommand; and controlling the first sensor and the second sensor togenerate the movement signal and the user bio-signal, respectively, inresponse to the sleep analysis start command being received.
 15. Themethod as claimed in claim 14, further comprising: receiving a sleepanalysis termination command; and calculating sleep efficiency from atime point at which the sleep analysis start command is received, to atime point at which the sleep analysis termination command is received,in response to the sleep analysis termination command being input. 16.The method as claimed in claim 11, wherein: the first sensor comprisesat least one among an acceleration sensor, a gyro sensor, and a gravitysensor; and the second sensor comprises a heartbeat sensor configured tomeasure a heartbeat of the user.
 17. The method as claimed in claim 16,wherein the generating the user bio-signal comprises emitting light togenerate a photoplethysmography (PPG) signal, by the heartbeat sensor.18. The method as claimed in claim 17, wherein the generating the userbio-signal comprises emitting the light periodically, by the heartbeatsensor.
 19. The method as claimed in claim 11, wherein the determiningthe operation state of the another electronic device comprisesdetermining whether the operation state of the another electronic deviceis to be changed based on the user sleeping state determined in each ofthe time periods, and the transmitting comprises transmitting thecontrol command corresponding to a changed operation state to theanother electronic device in response to the determining that theoperation state of the another electronic device is to be changed basedon the determined user sleeping state in a certain time period.
 20. Anon-transitory computer-readable recording medium having recordedthereon a program which, when executed by a computer system, causes thecomputer system to execute a method of controlling an electronic device,the method comprising: generating a movement signal based on a usermovement by a first sensor of the electronic device; generating a userbio-signal by a second sensor of the electronic device that physicallycontacts the user; determining a user sleeping state using the generatedmovement signal and the generated user bio-signal in each of timeperiods; determining an operation state of another electronic devicebased on the determined sleeping state in respective time periods; andtransmitting a control command corresponding to the determined operationstate to the another electronic device.